// div中放置子元素h1 p

import { h, init } from 'snabbdom'

let patch = init([])

let vnode = h('div#container', [
  h('h1', 'Hello Snavvdom'),
  h('p', '这是一个p标签')
])

let app = document.querySelector('#app')

let oldVnode = patch(app, vnode)

setTimeout(() => {
  vnode = h('div#container', [
    h('h1', '大白菜'),
    h('p', 'Hello')
  ])
  patch(oldVnode, vnode)
  patch(oldVnode, h('!'))
}, 1000)